<!--
 * @Descripttion:
 * @version:
 * @Author: xiajunchen
 * @Date: 2021-05-28 10:19:06
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-05-31 16:35:18
-->
<template>
  <el-input
    v-model="value"
    class="el-input-search"
    :placeholder="this.$props.items.placeholder || '请输入'"
    autocomplete="off"
    @change="input"
  />
</template>
<script>
export default {
  name: 'Input',
  props: {
    items: {
      type: Object,
      default: () => ({ options: [] })
    }
  },
  data: () => ({ value: '' }),
  mounted() { this.value = this.$props.items.value },
  methods: {
    input(e) {
      this.$parent.gatherParams({
        type: 'Input',
        key: this.$props.items.key,
        value: e || this.value
      })
    }
  }
}
</script>
<style scoped>
.el-input-search {
  display: inline-block;
  width: unset;
}
</style>
